************************
** Study 1 - Analyses **
************************

* setting directory
cd "C:\Users\bronc\Desktop\"

* load data
clear
use "C:\Users\bronc\Desktop\Study_1_dataset.dta"


** descriptive statistics **
sum age
tab gender
tab edu
tab educ_level
tab religios
sum lr
tab ideo_group vote_group, chi col



*******************
** Main analyses **
*******************

** Analyses among voting party bloc groups **

* one-sample t-test among right-wing voters
ttest ag_biased == 5 if vote_right==1

* one-sample t-test among left-wing voters
ttest ag_biased == 5 if vote_left==1

* one-sample t-test among centrists voters
ttest ag_biased == 5 if vote_center==1

* one-sample t-test among "others" group
ttest ag_biased == 5 if vote_other==1

* ANOVA - with the entire sample
oneway ag_biased vote_group if vote_group!=3, t sch
anova ag_biased vote_group if vote_group!=3


*****************
*** Figure 1B ***
*****************
twoway lpolyci ag_biased lr, degree(3) ///
legend(off) scheme(s2mono) graphregion(fcolor(white)) yline(5)



******************************
** Online appendix analyses **
******************************

** Analyses among ideological self-placement groups **
* one-sample t-test among Rightists
ttest ag_biased == 5 if ideo_group==2

* one-sample t-test among Leftists
ttest ag_biased == 5 if ideo_group==0

* one-sample t-test among Centrists
ttest ag_biased == 5 if ideo_group==1

* ANOVA - with the entire sample
oneway ag_biased ideo_group, t sch
anova ag_biased ideo_group, 

